import { request } from '@/utils/request';

export default class Index {

    // 点检 列表
    static getList (query) {
        return request({
            url: '/adient-pms/pad/deviceInspectionRecord/page',
            method: 'get',
            params: query
        });
    }

    // 点检 列表查询
    static searchKey (query) {
        return request({
            url: '/adient-pms/pc/deviceInspectionRecord/page',
            method: 'get',
            params: query
        });
    }

    // 点检详情
    static loadByNo (no) {
        return request({
            url: `/adient-pms/pad/deviceInspectionRecord/loadByNo/${no}`,
            method: 'get',
        });
    }

    // 点检开始
    static startInspection (query) {
        return request({
            url: `/adient-pms/pad/deviceInspectionRecord/startInspection`,
            method: 'put',
            params: query
        });
    }

    // 点检完成
    static finishInspection (query) {
        return request({
            url: `/adient-pms/pad/deviceInspectionRecord/finishInspection`,
            method: 'put',
            params: query
        });
    }

    // 上传
    static uploadFiles (file) {
        return request({
            url: '/admin-v3/sys-file/uploadFiles',
            method: 'post',
            files: file,
            formData: true
        })
    }

}